//
//  main.cpp
//  Cpp_Demo
//
//  Created by Robin Guo on 2017/9/23.
//  Copyright © 2017年 Robin Guo. All rights reserved.
//

#include <iostream>
using namespace std;
// 运算符重载
/*
 运算符重载的实质就是函数重载
 运算符也是一种函数
 */
class Point {
    float x,y;
    
public:
    float operator() (float a);

    Point(int a,int b){
        x=a;
        y=b;
    }
};

float Point::operator()(float a){
    return a+1;
}

int main(int argc, const char * argv[]) {
    Point ins(21,32);
//    float k = ins.operator()(5.0);
    float a = ins(5);
    cout << a << endl;
    
    float b = ins.operator()(6);
    cout << b << endl;
    
    return 0;
}
